//
//  GHPicComment.m
//  VideoPic
//
//  Created by GH on 16/4/5.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "GHPicComment.h"
#import "GHPicTableviewCell.h"
#import "GHPicGroupModel.h"

@interface GHPicComment ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic ,strong)UITableView *tableview;

@end

@implementation GHPicComment

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.tableview = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
    [self.view addSubview:self.tableview];
    self.tableview.dataSource = self;
    self.tableview.delegate = self;
    [self.tableview registerClass:[UITableViewCell class] forCellReuseIdentifier:@"pool"];
    [self.tableview registerClass:[GHPicTableviewCell class] forCellReuseIdentifier:@"pool1"];
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

    return 20;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    if (indexPath.row == 0) {
        GHPicTableviewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"pool1"];
        [cell passModelWith:self.model];
        return cell;
    }else {
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"pool"];

    return cell;
    }
}


- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    if (indexPath.row == 1) {
        return 600;
    }else {
    
        return 600;
    }



}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
